<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/layui/css/common.css}"/>
    <script type="text/jscript" th:src="@{/layui/layui.js}"></script>

</head>
<body th:fragment="head(n)">
<div class="head">
    <img class="head-img" th:src="@{/layui/images/logo.png}">
    <!-- 左侧导航条 -->
    <div class="head-icon">
        <ul class="layui-nav">
            <li class="layui-nav-item"><a href=""></a></li>
            <li class="layui-nav-item" th:classappend="${n==1} ? 'layui-this'">
                <a th:href="@{~/index}">首页</a>
            </li>
            <!--<li class="layui-nav-item" th:classappend="${n==2} ? 'layui-this'"><a th:href="@{/Blog/blogindex}">博客</a>-->
            <!--</li>-->
            <li class="layui-nav-item" th:classappend="${n==3} ? 'layui-this'"><a th:href="@{/Diary/diaryindex}">日记墙</a>
            </li>
            <li class="layui-nav-item" th:classappend="${n==4} ? 'layui-this'"><a th:href="@{/Learn/learnindex}">学习</a>
            </li>
        </ul>
    </div>
    <!-- 右侧导航条 登录后 -->
    <div class="login">
        <ul class="layui-nav">
            <li class="layui-nav-item pull-right login" th:classappend="${n==6} ? 'layui-this'">
                <a href="" th:href="@{/User/message}">消息中心</a>
                <!-- 	<dl class="layui-nav-child">
                        <dd><a href="javascript:;">博客</a></dd>
                        <dd><a href="javascript:;">日记</a></dd>
                        <dd><a href="javascript:;">评论</a></dd>
                        <dd><a href="javascript:;">系统</a></dd>
                    </dl> -->
            </li>
            <li class="layui-nav-item pull-right login" lay-unselect="" th:classappend="${n==5} ? 'layui-this'">
                <a href="javascript:;"><img src="../../../static/layui/images/head5.jpg" th:src="${session.user!=null? (session.user.getImg()!=null?session.user.getImg():'/layui/images/head-pic/head5.jpg'):'/layui/images/head-pic/head5.jpg'}" class="layui-nav-img">
                <span  th:if="${session.user!=null}" th:text=" ${session.user.name?:session.user.uid}">我</span></a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;" th:href="@{'/User/userfile/'+${session.user!=null? session.user.getUid():'0'}}">个人中心</a></dd>
                    <dd><a href="javascript:;" th:href="@{/User/usersafe}">安全管理</a></dd>
                    <dd><a href="javascript:;" th:href="@{'/User/userexh/'+${session.user!=null ? session.user.uid:'0'}}">我的博客</a></dd>
                    <dd><a href="javascript:;" th:href="@{/Blog/blogindex}">博客管理</a></dd>
                    <dd><a href="javascript:;" th:href="@{/Diary/diaryedit}">我的日记</a></dd>
                    <dd><a href="javascript:;" th:href="@{/exit}">退出</a></dd>
                </dl>
            </li>
        </ul>
    </div>
    <!-- 后侧导航条 登录前 -->
    <div class="loginout">
        <ul class="layui-nav">
            <li class="layui-nav-item pull-right"><a href="javascript:;" id="log">登录/注册</a></li>
            <!-- <li class="layui-nav-item pull-right"><a href="../login/aindex.html"  target="_blank" >登录</a></li>
            <li class="layui-nav-item pull-right"><a href="../login/register.html"  target="_blank" >注册</a></li> -->
        </ul>
    </div>
    <!-- 搜索框 -->
    <form class="layui-form" action="" th:action="@{/search}" method="post">
        <div class="layui-input-block">
            <button class="layui-icon layui-icon-search" type="submit"></button>
            <input type="select" name="select" required lay-verify="required" placeholder="请输入关键字" autocomplete="off"
                   class="layui-input">
        </div>
    </form>
    <input id="msg" type="hidden" th:value="${session.msg}">
    <input id="logstatus" type="hidden" th:value="${session.logstatus}">
    <!-- 渐变色 -->
    <div class="gradation"></div>
</div>
<!--<script type="text/jscript" th:src="@{/layui/lineEffects.js}"></script>-->
</body>
</html>
